package 三个连续奇数问题;

public class ThreeCondition {

    public boolean check(){
        int[] arr=new int[]{1,2,34,3,4,5,7,23,12};
        if(arr.length<3){
            return false;
        }
        for(int i=3;i<arr.length;i++){
            if(arr[i]%2>0&&arr[i-1]%2>0&&arr[i-2]%2>0){
                System.out.println(arr[i]);
                return true;
            }
        }
        return false;
    }



    public static void main(String[] args) {
        ThreeCondition threeCondition=new ThreeCondition();
        System.out.println(threeCondition.check());
    }
}
